package com.killer.servlet;

import java.io.IOException;
import org.apache.commons.lang.StringUtils;

public class HttpServlet implements Servlet {
    public HttpServlet() {
    }

    public void init() {
    }

    public void service(ServletRequest request, ServletResponse response) throws IOException {
        if (StringUtils.equals(request.getRequestMethod(), "GET")) {
            this.doGet(request, response);
        } else {
            this.doPost(request, response);
        }

    }

    protected void doPost(ServletRequest request, ServletResponse response) throws IOException {
    }

    protected void doGet(ServletRequest request, ServletResponse response) throws IOException {
    }
}